Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add proto and service for volume replication #205

Merged
merged 2 commits into from
Aug 22, 2022

Conversation

Rakshith-R
Copy link
Member

added required proto file and generate grpc library for internal communication
for volume replication

Signed-off-by: Rakshith R [email protected]

adding sidecar service for the volume replication service.

Signed-off-by: Rakshith R [email protected]

Updates: #116

Copy link
Contributor

@yati1998 yati1998 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the CI errors and correct them. Also, I assume these changes are transferred from the volume replication operator, if yes, it will be good to add the link to it in the commit-msg or PR description.

data, err := kube.GetSecret(ctx, rs.kubeClient, req.GetSecretName(), req.GetSecretNamespace())
if err != nil {
klog.Errorf("Failed to get secret %s in namespace %s: %v", req.GetSecretName(), req.GetSecretNamespace(), err)
return nil, status.Error(codes.InvalidArgument, err.Error())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always try the internal server error if the invalid is not the right error.

}

_, err = rs.controllerClient.PromoteVolume(ctx,
&csiReplication.PromoteVolumeRequest{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PromoteVolReq also has the force option which you need to consider

return nil, status.Error(codes.InvalidArgument, err.Error())
}

_, err = rs.controllerClient.ResyncVolume(ctx,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resync should return success or failure based on that we need to take few actions to reconcile the CR or not.

@Rakshith-R Rakshith-R marked this pull request as draft August 22, 2022 06:19
added required proto file and generate
grpc library for internal communication
for volume replication

Signed-off-by: Rakshith R <[email protected]>
adding sidecar service for the volume replication
service.

Signed-off-by: Rakshith R <[email protected]>
@mergify mergify bot added the vendor Pull requests that update vendored dependencies label Aug 22, 2022
@Rakshith-R Rakshith-R marked this pull request as ready for review August 22, 2022 07:00
@Rakshith-R
Copy link
Member Author

Please check the CI errors and correct them.

done

Also, I assume these changes are transferred from the volume replication operator, if yes, it will be good to add the link to it in the commit-msg or PR description.

Negative, this purely csi-addons design of internal proto and sidecar, I'll add them for controller part.

Other requested changes are addressed, PTAL.

@Rakshith-R Rakshith-R requested review from yati1998 and Madhu-1 August 22, 2022 07:02
@mergify mergify bot merged commit 2cfb7c2 into csi-addons:main Aug 22, 2022
Nikhil-Ladha pushed a commit to Nikhil-Ladha/kubernetes-csi-addons that referenced this pull request Sep 24, 2024
Syncing latest changes from upstream main for kubernetes-csi-addons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vendor Pull requests that update vendored dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants